﻿using System;
using System.Collections.Generic;

namespace Picnic
{
    /// <summary>
    /// Provides a set of equalty builder value providers.
    /// </summary>
    public interface IEqualityChain<T>
    {
        /// <summary>
        /// Objects should be equals by type.
        /// </summary>
        IEqualityChain<T> EqualsByType();

        /// <summary>
        /// Objects should be equals be specified String value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, string> valueProvider);

        /// <summary>
        /// Objects should be equals by specified String value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, string> valueProvider, bool ignoreCase);

        /// <summary>
        /// Objects should be equals by specified Int32 value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, int> valueProvider);

        /// <summary>
        /// Objects should be equals by specified Int64 value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, long> valueProvider);

        /// <summary>
        /// Objects should be equals by specified Decimal value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, decimal> valueProvider);

        /// <summary>
        /// Objects should be equals by specified Single value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, float> valueProvider);

        /// <summary>
        /// Objects should be equals by specified Double value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, double> valueProvider);

        /// <summary>
        /// Objects should be equals be specified Boolean value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, bool> valueProvider);

        /// <summary>
        /// Objects should be equals by specified DateTime value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, DateTime> valueProvider);

        /// <summary>
        /// Objects should be equals by specified TimeSpan value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, TimeSpan> valueProvider);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<string>> valueProvider);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<string>> valueProvider, bool ignoreCase);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<int>> valueProvider);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<long>> valueProvider);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<decimal>> valueProvider);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<double>> valueProvider);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<float>> valueProvider);

        /// <summary>
        /// Objects should be equals by specified collection.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, ICollection<bool>> valueProvider);

        /// <summary>
        /// Objects should be equals by specified Object value.
        /// </summary>
        IEqualityChain<T> EqualsBy(Func<T, object> valueProvider);

        /// <summary>
        /// Returns this equality chain result.
        /// </summary>
        bool GetResult();
    }
}
